package java3_21.Scanner;

public class Test {
    public static void main(String[] args) {
        Sonar sonar = new Sonar();
        MoveObject fish = new Fish("罗非鱼");
        MoveObject submarine = new Submarine("蛟龙一号");
        sonar.scan(fish);
        fish.print();
        ((Fish) fish).swim();
        System.out.println("***********************************");
        sonar.scan(submarine);
        submarine.print();
        ((Submarine) submarine).swim();
    }
}
